﻿using System.IO;
using System.Security.Cryptography;

public class SHA1Algorithm
{
    public static byte[] CalculateHash(string file)
    {
        FileStream stream = new FileStream(file, FileMode.Open);
        using (stream)
        {
            SHA1 sha1 = new SHA1CryptoServiceProvider();
            byte[] hash = sha1.ComputeHash(stream);
            return hash;
        }        
    }

    static void Main(string[] args)
    {
        byte[] hash = CalculateHash(@"InputOutputExamples.vshost.exe.manifest");
        foreach (var b in hash)
        {
            System.Console.WriteLine(b);
        }
    }
}